package com.jspxcms.plug.service;

import com.jspxcms.plug.domain.UserExchange;
import com.jspxcms.plug.domain.UserFavorite;
import org.springframework.data.domain.Page;

/**
 * Created by yuanyue on 14-9-21.
 */
public interface UserExchangeService {

    /**
     *
     * @param id
     * @return
     */
    public UserExchange findById(Integer id);
    /**
     *
     * @param exchange
     * @return
     */
    public UserExchange save(UserExchange exchange);

    /**
     * 是否已经申请过
     * @param userId
     * @param goodsId
     * @return
     */
    public boolean exists(Integer userId, Integer goodsId);


    public Page<UserExchange> findByUserId(Integer userId, Integer type, Integer pageIndex, Integer pageSize);

    public void update(UserExchange bean);
}
